﻿@using PagedList;
@using PagedList.Mvc;
<link href="~/Content/PagedList.css" rel="stylesheet" />
@model IPagedList<Sprint1.Models.Question>
@{
    ViewBag.Title = "Questions and Answers";
}
<h2>Questions and Answers</h2>
@if (Model != null)
{
    foreach (var item in Model)
    {
        @Html.Partial("~/Views/Shared/_Question.cshtml", item)
        @(int)Session["QuestionId"] = item.Id;
        <br />
    //Request.QueryString["CourseId"]
    }
    @Html.PagedListPager(Model, page => Url.Action("Q_A", new{page}),
            new PagedListRenderOptions()
            {
                Display = PagedListDisplayMode.IfNeeded,
                DisplayPageCountAndCurrentLocation = true
            }
    );

}

<div>
    @ViewBag.message
</div>
    @**CourseId=5*@